<?php
namespace app\admin\controller;
use think\Controller;
class Base extends Controller {

    public function _initialize()
    {
        $admin = session('Admin_user_lvtuan');
        if(empty($admin)){
           echo '<script language="javascript">top.location="'.config('tempredirect_url').'admin'.'";</script>';
             exit();
  /*          return  $this->redirect(config('tempredirect_url').'admin');*/
        }
    }

    public function __construct() {
        parent::__construct();
        $Admin = controller('Index');
        $Admin->adminSession();
    }
}
